﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YYSite.Common.Domain;

namespace YYSite.Domain.BaseData.Grades
{
   public class Grade:EntityBase<Guid>
    {
        /// <summary>
        /// 年级代码
        /// </summary>
        public virtual int GradeCode { get; set; }
        /// <summary>
        /// 学年
        /// </summary>
        public virtual int StudyYear { get; set; }
        /// <summary>
        /// 学期
        /// </summary>
        public virtual int Semester { get; set; }
        /// <summary>
        /// 年级
        /// </summary>
        public virtual string GradeName { get; set; }
     

        //public override bool Equals(object obj)
        //{
        //    if (obj == null)
        //        return false;
        //    var grade = obj as Grade;
        //    if (grade == null)
        //        return false;
        //    return grade.GradeCode == this.GradeCode && grade.StudyYear == this.StudyYear && grade.Semester == this.Semester;
        //}

        //public override int GetHashCode()
        //{
        //    string key = string.Format("{0}-{1}-{2}",this.GradeCode, this.StudyYear,this.Semester);
            
        //    return key.GetHashCode();
        //}
    }
}
